//
//  UIColor+System.swift
//  FearfulNotification
//
//  Created by 筱鹏 on 2018/1/11.
//  Copyright © 2018年 筱鹏. All rights reserved.
//

import UIKit

extension UIColor {
    convenience init(rgb: Int) {
        self.init(red: CGFloat((rgb & 0xFF0000) >> 16)/255.0, green: CGFloat((rgb & 0xFF00) >> 8)/255.0, blue: (CGFloat)(rgb & 0xFF)/255.0, alpha: 1.0)
    }
    
    convenience init(rgb: Int, _ alpha: CGFloat) {
        self.init(red: CGFloat((rgb & 0xFF0000) >> 16)/255.0, green: CGFloat((rgb & 0xFF00) >> 8)/255.0, blue: (CGFloat)(rgb & 0xFF)/255.0, alpha: alpha)
    }
}
